x86: sync thermal monitor LVT handling with Linux
authorJan Beulich <jbeulich@novell.com>
Wed, 15 Jun 2011 19:25:13 +0000 (20:25 +0100)
committerJan Beulich <jbeulich@novell.com>
Wed, 15 Jun 2011 19:25:13 +0000 (20:25 +0100)
commit5dae074ae546164b00895d7ebf86bbd3a47c8110
treecbc57ffab76ff1a8bebe64a568f947eb39494556
parent1d4a5602fc8829350b9bd8d12870d44c3c342c61
x86: sync thermal monitor LVT handling with Linux

As of 2.6.33, Linux checks that the thermal monitor LVT isn't set to
SMI delivery mode on just the value read on the boot CPU. As of 2.6.39
it additionally avoids writing back the saved value when its delivery
mode is FIXED (as this can cause APIC errors).

Changes done here that aren't in Linux are
- write back the boot CPU value also if delivery mode is FIXED, but
  there is also a valid vector
- print the messages when bailing out only once (on the boot CPU)
- when doing the final (enabling) write to the LVT, don't re-read the
  old value from the APIC, as we have it in a local variable already

Signed-off-by: Jan Beulich <jbeulich@novell.com>
xen/arch/x86/cpu/mcheck/mce_intel.c